﻿using System;
using System.Net;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace MangaKurosagi
{
     public class StoriesOffline : Stories
    {
        public List<ChapOffline> lsChap = new List<ChapOffline>();

        public BitmapImage ImageSource
        {
            get { return ImageHelper.LoadImage(this.UrlImage); }
        }

        public static StoriesOffline Convert(Stories stori, List<ChapOffline> lsChap)
        {
            StoriesOffline offline = new StoriesOffline();
            offline.Title = stori.Title;
            offline.Description = stori.Description;
            offline.Url = stori.Url;
            offline.UrlImage = stori.UrlImage;
            if (lsChap != null)
                offline.lsChap = lsChap;

            return offline;
        }
    }
}
